// nc1 [字符串模拟]大数相加
// https://www.nowcoder.com/practice/11ae12e8c6fe48f883cad618c2e81475
//以字符串的形式读入两个数字，编写一个函数计算它们的和，以字符串形式返回。
//数据范围：s.length,t.length≤100000，字符串仅由'0'~‘9’构成
//要求：时间复杂度 O(n)

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <iostream>
#include <string>

#define MAX_Count 100
struct BigNum {
  int num[MAX_Count];
  std::string raw;
  int count;
  BigNum() {
    memset(num, 0, sizeof(num));
    count = 0;
  }
  int toArray(std::string s) {
    int i = 0;
    for (i = 0; i < MAX_Count && s.size() > 0; i++) {
      std::string tmp;
      if (s.size() > 8) {
        tmp = s.substr(s.size() - 8);
        s = s.substr(0, s.size() - 8);
      } else {
        tmp = s;
        s.clear();
      }

      if (tmp.size() == 0) {
        break;
      }
      char *ptr = NULL;
      num[i] = strtol(tmp.c_str(), &ptr, 10);
    }
    count = i;
    return 0;
  }
  void add(BigNum b2) {
    int addv = 0;
    int i = 0;
    for (; i < count || i < b2.count || addv; i++) {
      int tmp = this->num[i] + b2.num[i] + addv;
      if (tmp >= 100000000) {
        addv = tmp / 100000000;
        num[i] = tmp % 100000000;
      } else {
        addv = tmp / 100000000;
        num[i] = tmp % 100000000;
      }
      if (num[i] && count <= i) {
        count = i + 1;
      }
    }
  }
  void print() {
    for (int i = count - 1; i >= 0; i--) {
      if (i == count - 1)
        printf("%d", num[i]);
      else
        printf("%08d", num[i]);
    }
    printf("\n");
  }
};

int main() {
  char sz1[1000] = {0};
  char sz2[1000] = {0};
  std::string s1;
  while (scanf("%s", sz1) != EOF) {
    int a1[100] = {0};
    int a2[100] = {0};
    std::string s2;
    scanf("%s", sz2);
    BigNum b1, b2;
    b1.toArray(sz1);
    b2.toArray(sz2);
    b1.add(b2);
    b1.print();
  }
}
